﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_MasterPages/layout.Master" AutoEventWireup="true" CodeBehind="RSViewInventory.aspx.cs" Inherits="mojoPortal.Web.RS.SBM.Telerik.View.RSViewInventory" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>


<asp:Content ID="Content1" ContentPlaceHolderID="leftContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">

<div align="center"><asp:Button ID="btnAddInventory" runat="server" Text="Add Inventory" onclick="btnAddInventory_Click" /></div>
<telerik:RadTreeList ID="RadTreeList1" runat="server" OnNeedDataSource="RadTreeList1_NeedDataSource"
    ParentDataKeyNames="ParentID" DataKeyNames="ProductID" AllowPaging="true" PageSize="25" 
    OnItemDataBound="RadTreeList1_ItemDataBound" AutoGenerateColumns="false" AllowSorting="true">
    <Columns>
        <telerik:TreeListBoundColumn DataField="ProductID" UniqueName="ProductID" HeaderText="ProductID" HeaderStyle-Width="60px" />
        <telerik:TreeListTemplateColumn DataField="ProductName" UniqueName="ProductName" HeaderText="ProductName">
            <ItemTemplate>
                <asp:HyperLink ID="hlProductLink" runat="server" Text='<%# Eval("ProductName") %>'></asp:HyperLink>
                <%# Eval("Quantity").ToString() != "" ? "&nbsp;(" + Eval("Quantity").ToString() + ")" : ""%>
            </ItemTemplate>
                
            <HeaderStyle Width="300px" />
        </telerik:TreeListTemplateColumn>
        <telerik:TreeListBoundColumn DataField="Price" UniqueName="Price" DataFormatString="{0:C2}"
            HeaderText="Price" DataType="System.Decimal" HeaderStyle-Width="60px">
            <ItemStyle HorizontalAlign="Left" />
        </telerik:TreeListBoundColumn>
<%--            <telerik:TreeListBoundColumn DataField="Quantity" UniqueName="Quantity" HeaderText="Quantity" HeaderStyle-Width="60px">
            <ItemStyle HorizontalAlign="Left" />
        </telerik:TreeListBoundColumn>   --%>         
        <telerik:TreeListCheckBoxColumn DataField="InStock" UniqueName="InStock" HeaderText="InStock">
            <HeaderStyle Width="60px" />
            <ItemStyle HorizontalAlign="Center" />
        </telerik:TreeListCheckBoxColumn>
        <telerik:TreeListBoundColumn DataField="Quantity" UniqueName="Quantity" HeaderText="UnitsInStock" HeaderStyle-Width="60px" />

<%--            <telerik:TreeListBoundColumn DataField="ParentID" UniqueName="ParentID" HeaderText="ParentID" HeaderStyle-Width="60px">
            <ItemStyle HorizontalAlign="Left" />
        </telerik:TreeListBoundColumn>--%>
    </Columns>
</telerik:RadTreeList>
<br />

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rightContent" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="pageEditContent" runat="server">
</asp:Content>
